package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.business.service.family.LoanNewAdvertCreditCardService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.LoanNewAdvertCreditCardRequest;
import com.tuanzi.loan.vo.response.family.LoanNewAdvertCreditCardResponse;
import org.springframework.data.domain.Page;

/**
 * User: liangZongXi
 * Create time: 13:46 2018/9/5
 * Description:
 */
public class LoanNewAdvertCreditCardLazyDataModel extends BaseLazyDataModel<LoanNewAdvertCreditCardRequest, LoanNewAdvertCreditCardResponse> {


    private static final long serialVersionUID = 3706068587043784837L;

    private LoanNewAdvertCreditCardService loanNewAdvertCreditCardService = SpringContextHolder.getBean(LoanNewAdvertCreditCardService.class);


    public LoanNewAdvertCreditCardLazyDataModel(LoanNewAdvertCreditCardRequest loanNewAdvertCreditCardRequest) {
        super(loanNewAdvertCreditCardRequest);
    }

    @Override
    protected Page<LoanNewAdvertCreditCardResponse> doLoad(PageSearcher<LoanNewAdvertCreditCardRequest> pageSearcher) {
        return loanNewAdvertCreditCardService.list(pageSearcher);
    }
}
